home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Macintosh Sample Code / Monthly Releases (Compressed) / MacDTS.Sample.Code.89.06.sit / SC.014.CPlusTESample / TApplication.cp < prev    next >
MacBinary  |  1989-04-01  |  11.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert MS-DOS Code Page Info (other/dosCodePage) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sat Apr 1 15:02:04 1989, modified Sat Apr 1 15:02:04 1989, creator 'MPS ', type ASCII, 11144 bytes "TApplication.cp" , at 0x2c08 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 54 41 70 70 6c 69 | 63 61 74 69 6f 6e 2e 63 |..TAppli|cation.c|
|00000010| 70 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2b 88 00 | 00 01 7e a0 5a db 3c a0 |.....+..|..~.Z.<.|
|00000060| 5a db 3c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |Z.<.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 dc 19 00 00 |........|........|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000d0| 0d 23 0d 23 09 41 70 70 | 6c 65 20 4d 61 63 69 6e |.#.#.App|le Macin|
|000000e0| 74 6f 73 68 20 44 65 76 | 65 6c 6f 70 65 72 20 54 |tosh Dev|eloper T|
|000000f0| 65 63 68 6e 69 63 61 6c | 20 53 75 70 70 6f 72 74 |echnical| Support|
|00000100| 0d 23 0d 23 09 4d 75 6c | 74 69 46 69 6e 64 65 72 |.#.#.Mul|tiFinder|
|00000110| 2d 41 77 61 72 65 20 53 | 69 6d 70 6c 65 20 54 65 |-Aware S|imple Te|
|00000120| 78 74 45 64 69 74 20 53 | 61 6d 70 6c 65 20 41 70 |xtEdit S|ample Ap|
|00000130| 70 6c 69 63 61 74 69 6f | 6e 0d 23 0d 23 09 43 50 |plicatio|n.#.#.CP|
|00000140| 6c 75 73 54 45 53 61 6d | 70 6c 65 0d 23 0d 23 09 |lusTESam|ple.#.#.|
|00000150| 54 41 70 70 6c 69 63 61 | 74 69 6f 6e 2e 63 70 09 |TApplica|tion.cp.|
|00000160| 09 2d 09 43 2b 2b 20 73 | 6f 75 72 63 65 0d 23 0d |.-.C++ s|ource.#.|
|00000170| 23 09 43 6f 70 79 72 69 | 67 68 74 20 a9 20 31 39 |#.Copyri|ght . 19|
|00000180| 38 39 20 41 70 70 6c 65 | 20 43 6f 6d 70 75 74 65 |89 Apple| Compute|
|00000190| 72 2c 20 49 6e 63 2e 0d | 23 09 41 6c 6c 20 72 69 |r, Inc..|#.All ri|
|000001a0| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0d 23 |ghts res|erved..#|
|000001b0| 0d 23 09 56 65 72 73 69 | 6f 6e 73 3a 09 0d 23 09 |.#.Versi|ons:..#.|
|000001c0| 09 09 31 2e 30 30 20 09 | 09 09 09 09 30 34 2f 38 |..1.00 .|....04/8|
|000001d0| 39 0d 23 0d 23 09 43 6f | 6d 70 6f 6e 65 6e 74 73 |9.#.#.Co|mponents|
|000001e0| 3a 0d 23 09 09 09 43 50 | 6c 75 73 54 45 53 61 6d |:.#...CP|lusTESam|
|000001f0| 70 6c 65 2e 6d 61 6b 65 | 09 09 41 70 72 69 6c 20 |ple.make|..April |
|00000200| 31 2c 20 31 39 38 39 0d | 23 09 09 09 54 41 70 70 |1, 1989.|#...TApp|
|00000210| 6c 69 63 61 74 69 6f 6e | 43 6f 6d 6d 6f 6e 2e 68 |lication|Common.h|
|00000220| 09 41 70 72 69 6c 20 31 | 2c 20 31 39 38 39 0d 23 |.April 1|, 1989.#|
|00000230| 09 09 09 54 41 70 70 6c | 69 63 61 74 69 6f 6e 2e |...TAppl|ication.|
|00000240| 68 09 09 09 41 70 72 69 | 6c 20 31 2c 20 31 39 38 |h...Apri|l 1, 198|
|00000250| 39 0d 23 09 09 09 54 44 | 6f 63 75 6d 65 6e 74 2e |9.#...TD|ocument.|
|00000260| 68 09 09 09 09 41 70 72 | 69 6c 20 31 2c 20 31 39 |h....Apr|il 1, 19|
|00000270| 38 39 0d 23 09 09 09 54 | 45 43 6f 6d 6d 6f 6e 2e |89.#...T|ECommon.|
|00000280| 68 09 09 09 09 41 70 72 | 69 6c 20 31 2c 20 31 39 |h....Apr|il 1, 19|
|00000290| 38 39 0d 23 09 09 09 54 | 45 53 61 6d 70 6c 65 2e |89.#...T|ESample.|
|000002a0| 68 09 09 09 09 41 70 72 | 69 6c 20 31 2c 20 31 39 |h....Apr|il 1, 19|
|000002b0| 38 39 0d 23 09 09 09 54 | 45 44 6f 63 75 6d 65 6e |89.#...T|EDocumen|
|000002c0| 74 2e 68 09 09 09 41 70 | 72 69 6c 20 31 2c 20 31 |t.h...Ap|ril 1, 1|
|000002d0| 39 38 39 0d 23 09 09 09 | 54 41 70 70 6c 69 63 61 |989.#...|TApplica|
|000002e0| 74 69 6f 6e 2e 63 70 09 | 09 09 41 70 72 69 6c 20 |tion.cp.|..April |
|000002f0| 31 2c 20 31 39 38 39 0d | 23 09 09 09 54 44 6f 63 |1, 1989.|#...TDoc|
|00000300| 75 6d 65 6e 74 2e 63 70 | 09 09 09 41 70 72 69 6c |ument.cp|...April|
|00000310| 20 31 2c 20 31 39 38 39 | 0d 23 09 09 09 54 45 53 | 1, 1989|.#...TES|
|00000320| 61 6d 70 6c 65 2e 63 70 | 09 09 09 09 41 70 72 69 |ample.cp|....Apri|
|00000330| 6c 20 31 2c 20 31 39 38 | 39 0d 23 09 09 09 54 45 |l 1, 198|9.#...TE|
|00000340| 44 6f 63 75 6d 65 6e 74 | 2e 63 70 09 09 09 41 70 |Document|.cp...Ap|
|00000350| 72 69 6c 20 31 2c 20 31 | 39 38 39 0d 23 09 09 09 |ril 1, 1|989.#...|
|00000360| 54 45 53 61 6d 70 6c 65 | 47 6c 75 65 2e 61 09 09 |TESample|Glue.a..|
|00000370| 09 41 70 72 69 6c 20 31 | 2c 20 31 39 38 39 0d 23 |.April 1|, 1989.#|
|00000380| 09 09 09 54 41 70 70 6c | 69 63 61 74 69 6f 6e 2e |...TAppl|ication.|
|00000390| 72 09 09 09 41 70 72 69 | 6c 20 31 2c 20 31 39 38 |r...Apri|l 1, 198|
|000003a0| 39 0d 23 09 09 09 54 45 | 53 61 6d 70 6c 65 2e 72 |9.#...TE|Sample.r|
|000003b0| 09 09 09 09 41 70 72 69 | 6c 20 31 2c 20 31 39 38 |....Apri|l 1, 198|
|000003c0| 39 0d 23 0d 23 09 43 50 | 6c 75 73 54 45 53 61 6d |9.#.#.CP|lusTESam|
|000003d0| 70 6c 65 20 69 73 20 61 | 6e 20 65 78 61 6d 70 6c |ple is a|n exampl|
|000003e0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 68 |e applic|ation th|
|000003f0| 61 74 20 64 65 6d 6f 6e | 73 74 72 61 74 65 73 0d |at demon|strates.|
|00000400| 23 09 68 6f 77 20 74 6f | 20 69 6e 69 74 69 61 6c |#.how to| initial|
|00000410| 69 7a 65 20 74 68 65 20 | 63 6f 6d 6d 6f 6e 6c 79 |ize the |commonly|
|00000420| 20 75 73 65 64 20 74 6f | 6f 6c 62 6f 78 20 6d 61 | used to|olbox ma|
|00000430| 6e 61 67 65 72 73 2c 0d | 23 09 6f 70 65 72 61 74 |nagers,.|#.operat|
|00000440| 65 20 73 75 63 63 65 73 | 73 66 75 6c 6c 79 20 75 |e succes|sfully u|
|00000450| 6e 64 65 72 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |nder Mul|tiFinder|
|00000460| 2c 20 68 61 6e 64 6c 65 | 20 64 65 73 6b 0d 23 09 |, handle| desk.#.|
|00000470| 61 63 63 65 73 73 6f 72 | 69 65 73 20 61 6e 64 20 |accessor|ies and |
|00000480| 63 72 65 61 74 65 2c 20 | 67 72 6f 77 2c 20 61 6e |create, |grow, an|
|00000490| 64 20 7a 6f 6f 6d 20 77 | 69 6e 64 6f 77 73 2e 20 |d zoom w|indows. |
|000004a0| 54 68 65 0d 23 09 66 75 | 6e 64 61 6d 65 6e 74 61 |The.#.fu|ndamenta|
|000004b0| 6c 20 54 65 78 74 45 64 | 69 74 20 74 6f 6f 6c 62 |l TextEd|it toolb|
|000004c0| 6f 78 20 63 61 6c 6c 73 | 20 61 6e 64 20 54 65 78 |ox calls| and Tex|
|000004d0| 74 45 64 69 74 20 61 75 | 74 6f 73 63 72 6f 6c 6c |tEdit au|toscroll|
|000004e0| 0d 23 09 61 72 65 20 64 | 65 6d 6f 6e 73 74 72 61 |.#.are d|emonstra|
|000004f0| 74 65 64 2e 20 49 74 20 | 61 6c 73 6f 20 73 68 6f |ted. It |also sho|
|00000500| 77 73 20 68 6f 77 20 74 | 6f 20 63 72 65 61 74 65 |ws how t|o create|
|00000510| 20 61 6e 64 20 6d 61 69 | 6e 74 61 69 6e 0d 23 09 | and mai|ntain.#.|
|00000520| 73 63 72 6f 6c 6c 62 61 | 72 20 63 6f 6e 74 72 6f |scrollba|r contro|
|00000530| 6c 73 2e 20 0d 23 0d 23 | 09 54 68 69 73 20 76 65 |ls. .#.#|.This ve|
|00000540| 72 73 69 6f 6e 20 6f 66 | 20 54 45 53 61 6d 70 6c |rsion of| TESampl|
|00000550| 65 20 68 61 73 20 62 65 | 65 6e 20 73 75 62 73 74 |e has be|en subst|
|00000560| 61 6e 74 69 61 6c 6c 79 | 20 72 65 77 6f 72 6b 65 |antially| reworke|
|00000570| 64 20 69 6e 0d 23 09 43 | 2b 2b 20 74 6f 20 73 68 |d in.#.C|++ to sh|
|00000580| 6f 77 20 68 6f 77 20 61 | 20 22 74 79 70 69 63 61 |ow how a| "typica|
|00000590| 6c 22 20 6f 62 6a 65 63 | 74 20 6f 72 69 65 6e 74 |l" objec|t orient|
|000005a0| 65 64 20 70 72 6f 67 72 | 61 6d 20 63 6f 75 6c 64 |ed progr|am could|
|000005b0| 0d 23 09 62 65 20 77 72 | 69 74 74 65 6e 2e 20 54 |.#.be wr|itten. T|
|000005c0| 6f 20 74 68 69 73 20 65 | 6e 64 2c 20 77 68 61 74 |o this e|nd, what|
|000005d0| 20 77 61 73 20 6f 6e 63 | 65 20 61 20 73 69 6e 67 | was onc|e a sing|
|000005e0| 6c 65 20 73 6f 75 72 63 | 65 20 63 6f 64 65 0d 23 |le sourc|e code.#|
|000005f0| 09 66 69 6c 65 20 68 61 | 73 20 62 65 65 6e 20 72 |.file ha|s been r|
|00000600| 65 73 74 72 75 63 74 75 | 72 65 64 20 69 6e 74 6f |estructu|red into|
|00000610| 20 61 20 73 65 74 20 6f | 66 20 63 6c 61 73 73 65 | a set o|f classe|
|00000620| 73 20 77 68 69 63 68 0d | 23 09 64 65 6d 6f 6e 73 |s which.|#.demons|
|00000630| 74 72 61 74 65 20 74 68 | 65 20 61 64 76 61 6e 74 |trate th|e advant|
|00000640| 61 67 65 73 20 6f 66 20 | 6f 62 6a 65 63 74 2d 6f |ages of |object-o|
|00000650| 72 69 65 6e 74 65 64 20 | 70 72 6f 67 72 61 6d 6d |riented |programm|
|00000660| 69 6e 67 2e 0d 23 0d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ing..#.-|--------|
|00000670| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000680| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006b0| 2d 2d 2d 2d 2d 2a 2f 0d | 0d 0d 2f 2a 0d 53 65 67 |-----*/.|../*.Seg|
|000006c0| 6d 65 6e 74 61 74 69 6f | 6e 20 73 74 72 61 74 65 |mentatio|n strate|
|000006d0| 67 79 3a 0d 0d 20 20 20 | 20 54 68 69 73 20 70 72 |gy:.. | This pr|
|000006e0| 6f 67 72 61 6d 20 68 61 | 73 20 6f 6e 6c 79 20 6f |ogram ha|s only o|
|000006f0| 6e 65 20 73 65 67 6d 65 | 6e 74 2c 20 73 69 6e 63 |ne segme|nt, sinc|
|00000700| 65 20 74 68 65 20 69 73 | 73 75 65 73 0d 20 20 20 |e the is|sues. |
|00000710| 20 73 75 72 72 6f 75 6e | 64 69 6e 67 20 73 65 67 | surroun|ding seg|
|00000720| 6d 65 6e 74 61 74 69 6f | 6e 20 77 69 74 68 69 6e |mentatio|n within|
|00000730| 20 61 20 63 6c 61 73 73 | 27 73 20 6d 65 74 68 6f | a class|'s metho|
|00000740| 64 73 20 68 61 76 65 0d | 20 20 20 20 6e 6f 74 20 |ds have.| not |
|00000750| 62 65 65 6e 20 69 6e 76 | 65 73 74 69 67 61 74 65 |been inv|estigate|
|00000760| 64 20 79 65 74 2e 20 57 | 65 20 44 4f 20 75 6e 6c |d yet. W|e DO unl|
|00000770| 6f 61 64 20 74 68 65 20 | 64 61 74 61 0d 20 20 20 |oad the |data. |
|00000780| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 20 | initial|ization |
|00000790| 73 65 67 6d 65 6e 74 20 | 61 74 20 73 74 61 72 74 |segment |at start|
|000007a0| 75 70 20 74 69 6d 65 2c | 20 77 68 69 63 68 20 66 |up time,| which f|
|000007b0| 72 65 65 73 20 75 70 0d | 20 20 20 20 73 6f 6d 65 |rees up.| some|
|000007c0| 20 6d 65 6d 6f 72 79 20 | 0d 0d 53 65 74 50 6f 72 | memory |..SetPor|
|000007d0| 74 20 73 74 72 61 74 65 | 67 79 3a 0d 0d 20 20 20 |t strate|gy:.. |
|000007e0| 20 54 6f 6f 6c 62 6f 78 | 20 72 6f 75 74 69 6e 65 | Toolbox| routine|
|000007f0| 73 20 64 6f 20 6e 6f 74 | 20 63 68 61 6e 67 65 20 |s do not| change |
|00000800| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 6f 72 74 |the curr|ent port|
|00000810| 2e 20 49 6e 0d 20 20 20 | 20 73 70 69 74 65 20 6f |. In. | spite o|
|00000820| 66 20 74 68 69 73 2c 20 | 69 6e 20 74 68 69 73 20 |f this, |in this |
|00000830| 70 72 6f 67 72 61 6d 20 | 77 65 20 75 73 65 20 61 |program |we use a|
|00000840| 20 73 74 72 61 74 65 67 | 79 20 6f 66 0d 20 20 20 | strateg|y of. |
|00000850| 20 63 61 6c 6c 69 6e 67 | 20 53 65 74 50 6f 72 74 | calling| SetPort|
|00000860| 20 77 68 65 6e 65 76 65 | 72 20 77 65 20 77 61 6e | wheneve|r we wan|
|00000870| 74 20 74 6f 20 64 72 61 | 77 20 6f 72 20 6d 61 6b |t to dra|w or mak|
|00000880| 65 20 63 61 6c 6c 73 0d | 20 20 20 20 77 68 69 63 |e calls.| whic|
|00000890| 68 20 64 65 70 65 6e 64 | 20 6f 6e 20 74 68 65 20 |h depend| on the |
|000008a0| 63 75 72 72 65 6e 74 20 | 70 6f 72 74 2e 20 54 68 |current |port. Th|
|000008b0| 69 73 20 6d 61 6b 65 73 | 20 75 73 20 6c 65 73 73 |is makes| us less|
|000008c0| 0d 20 20 20 20 76 75 6c | 6e 65 72 61 62 6c 65 20 |. vul|nerable |
|000008d0| 74 6f 20 62 75 67 73 20 | 69 6e 20 6f 74 68 65 72 |to bugs |in other|
|000008e0| 20 73 6f 66 74 77 61 72 | 65 20 77 68 69 63 68 20 | softwar|e which |
|000008f0| 6d 69 67 68 74 20 61 6c | 74 65 72 0d 20 20 20 20 |might al|ter. |
|00000900| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 6f 72 74 |the curr|ent port|
|00000910| 20 28 73 75 63 68 20 61 | 73 20 74 68 65 20 62 75 | (such a|s the bu|
|00000920| 67 20 28 66 65 61 74 75 | 72 65 3f 29 20 69 6e 20 |g (featu|re?) in |
|00000930| 6d 61 6e 79 0d 20 20 20 | 20 64 65 73 6b 20 61 63 |many. | desk ac|
|00000940| 63 65 73 73 6f 72 69 65 | 73 20 77 68 69 63 68 20 |cessorie|s which |
|00000950| 63 68 61 6e 67 65 20 74 | 68 65 20 70 6f 72 74 20 |change t|he port |
|00000960| 6f 6e 20 4f 70 65 6e 44 | 65 73 6b 41 63 63 29 2e |on OpenD|eskAcc).|
|00000970| 0d 20 20 20 20 48 6f 70 | 65 66 75 6c 6c 79 2c 20 |. Hop|efully, |
|00000980| 74 68 69 73 20 61 6c 73 | 6f 20 6d 61 6b 65 73 20 |this als|o makes |
|00000990| 74 68 65 20 72 6f 75 74 | 69 6e 65 73 20 66 72 6f |the rout|ines fro|
|000009a0| 6d 20 74 68 69 73 0d 20 | 20 20 20 70 72 6f 67 72 |m this. | progr|
|000009b0| 61 6d 20 6d 6f 72 65 20 | 73 65 6c 66 2d 63 6f 6e |am more |self-con|
|000009c0| 74 61 69 6e 65 64 2c 20 | 73 69 6e 63 65 20 74 68 |tained, |since th|
|000009d0| 65 79 20 64 6f 6e 27 74 | 20 64 65 70 65 6e 64 20 |ey don't| depend |
|000009e0| 6f 6e 0d 20 20 20 20 74 | 68 65 20 63 75 72 72 65 |on. t|he curre|
|000009f0| 6e 74 20 70 6f 72 74 20 | 73 65 74 74 69 6e 67 2e |nt port |setting.|
|00000a00| 20 0d 0d 43 6c 69 70 62 | 6f 61 72 64 20 73 74 72 | ..Clipb|oard str|
|00000a10| 61 74 65 67 79 3a 0d 0d | 20 20 20 20 54 68 69 73 |ategy:..| This|
|00000a20| 20 70 72 6f 67 72 61 6d | 20 64 6f 65 73 20 6e 6f | program| does no|
|00000a30| 74 20 6d 61 69 6e 74 61 | 69 6e 20 61 20 70 72 69 |t mainta|in a pri|
|00000a40| 76 61 74 65 20 73 63 72 | 61 70 2e 0d 20 20 20 20 |vate scr|ap.. |
|00000a50| 57 68 65 6e 65 76 65 72 | 20 61 20 63 75 74 2c 20 |Whenever| a cut, |
|00000a60| 63 6f 70 79 2c 20 6f 72 | 20 70 61 73 74 65 20 6f |copy, or| paste o|
|00000a70| 63 63 75 72 73 2c 20 77 | 65 20 69 6d 70 6f 72 74 |ccurs, w|e import|
|00000a80| 2f 65 78 70 6f 72 74 0d | 20 20 20 20 66 72 6f 6d |/export.| from|
|00000a90| 20 74 68 65 20 70 75 62 | 6c 69 63 20 73 63 72 61 | the pub|lic scra|
|00000aa0| 70 20 74 6f 20 54 65 78 | 74 45 64 69 74 27 73 20 |p to Tex|tEdit's |
|00000ab0| 73 63 72 61 70 20 72 69 | 67 68 74 20 61 77 61 79 |scrap ri|ght away|
|00000ac0| 2c 0d 20 20 20 20 75 73 | 69 6e 67 20 74 68 65 20 |,. us|ing the |
|00000ad0| 54 45 54 6f 53 63 72 61 | 70 20 61 6e 64 20 54 45 |TEToScra|p and TE|
|00000ae0| 46 72 6f 6d 53 63 72 61 | 70 20 72 6f 75 74 69 6e |FromScra|p routin|
|00000af0| 65 73 2e 20 49 66 20 77 | 65 20 64 69 64 0d 20 20 |es. If w|e did. |
|00000b00| 20 20 75 73 65 20 61 20 | 70 72 69 76 61 74 65 20 | use a |private |
|00000b10| 73 63 72 61 70 2c 20 74 | 68 65 20 69 6d 70 6f 72 |scrap, t|he impor|
|00000b20| 74 2f 65 78 70 6f 72 74 | 20 77 6f 75 6c 64 20 62 |t/export| would b|
|00000b30| 65 20 69 6e 20 74 68 65 | 0d 20 20 20 20 61 63 74 |e in the|. act|
|00000b40| 69 76 61 74 65 2f 64 65 | 61 63 74 69 76 61 74 65 |ivate/de|activate|
|00000b50| 20 65 76 65 6e 74 20 61 | 6e 64 20 73 75 73 70 65 | event a|nd suspe|
|00000b60| 6e 64 2f 72 65 73 75 6d | 65 20 65 76 65 6e 74 0d |nd/resum|e event.|
|00000b70| 20 20 20 20 72 6f 75 74 | 69 6e 65 73 2e 20 0d 2a | rout|ines. .*|
|00000b80| 2f 0d 0d 2f 2f 20 4d 61 | 63 20 49 6e 63 6c 75 64 |/..// Ma|c Includ|
|00000b90| 65 73 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 79 70 |es.#incl|ude <Typ|
|00000ba0| 65 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |es.h>.#i|nclude <|
|00000bb0| 51 75 69 63 6b 44 72 61 | 77 2e 68 3e 0d 23 69 6e |QuickDra|w.h>.#in|
|00000bc0| 63 6c 75 64 65 20 3c 46 | 6f 6e 74 73 2e 68 3e 0d |clude <F|onts.h>.|
|00000bd0| 23 69 6e 63 6c 75 64 65 | 20 3c 45 76 65 6e 74 73 |#include| <Events|
|00000be0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 43 6f |.h>.#inc|lude <Co|
|00000bf0| 6e 74 72 6f 6c 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |ntrols.h|>.#inclu|
|00000c00| 64 65 20 3c 57 69 6e 64 | 6f 77 73 2e 68 3e 0d 23 |de <Wind|ows.h>.#|
|00000c10| 69 6e 63 6c 75 64 65 20 | 3c 4d 65 6e 75 73 2e 68 |include |<Menus.h|
|00000c20| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 54 65 78 74 |>.#inclu|de <Text|
|00000c30| 45 64 69 74 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |Edit.h>.|#include|
|00000c40| 20 3c 44 69 61 6c 6f 67 | 73 2e 68 3e 0d 23 69 6e | <Dialog|s.h>.#in|
|00000c50| 63 6c 75 64 65 20 3c 44 | 65 73 6b 2e 68 3e 0d 23 |clude <D|esk.h>.#|
|00000c60| 69 6e 63 6c 75 64 65 20 | 3c 53 63 72 61 70 2e 68 |include |<Scrap.h|
|00000c70| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 54 6f 6f 6c |>.#inclu|de <Tool|
|00000c80| 55 74 69 6c 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Utils.h>|.#includ|
|00000c90| 65 20 3c 4d 65 6d 6f 72 | 79 2e 68 3e 0d 23 69 6e |e <Memor|y.h>.#in|
|00000ca0| 63 6c 75 64 65 20 3c 53 | 65 67 4c 6f 61 64 2e 68 |clude <S|egLoad.h|
|00000cb0| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 46 69 6c 65 |>.#inclu|de <File|
|00000cc0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 4f |s.h>.#in|clude <O|
|00000cd0| 53 55 74 69 6c 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |SUtils.h|>.#inclu|
|00000ce0| 64 65 20 3c 54 72 61 70 | 73 2e 68 3e 0d 0d 23 69 |de <Trap|s.h>..#i|
|00000cf0| 6e 63 6c 75 64 65 20 22 | 54 41 70 70 6c 69 63 61 |nclude "|TApplica|
|00000d00| 74 69 6f 6e 2e 68 22 0d | 0d 2f 2f 20 4f 53 45 76 |tion.h".|.// OSEv|
|00000d10| 65 6e 74 20 69 73 20 74 | 68 65 20 65 76 65 6e 74 |ent is t|he event|
|00000d20| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 20 73 | number |of the s|
|00000d30| 75 73 70 65 6e 64 2f 72 | 65 73 75 6d 65 20 61 6e |uspend/r|esume an|
|00000d40| 64 20 6d 6f 75 73 65 2d | 6d 6f 76 65 64 20 65 76 |d mouse-|moved ev|
|00000d50| 65 6e 74 73 20 73 65 6e | 74 0d 2f 2f 20 62 79 20 |ents sen|t.// by |
|00000d60| 4d 75 6c 74 69 46 69 6e | 64 65 72 2e 20 4f 6e 63 |MultiFin|der. Onc|
|00000d70| 65 20 77 65 20 64 65 74 | 65 72 6d 69 6e 65 20 74 |e we det|ermine t|
|00000d80| 68 61 74 20 61 6e 20 65 | 76 65 6e 74 20 69 73 20 |hat an e|vent is |
|00000d90| 61 6e 20 6f 73 45 76 65 | 6e 74 2c 20 77 65 20 6c |an osEve|nt, we l|
|00000da0| 6f 6f 6b 20 61 74 20 74 | 68 65 0d 2f 2f 20 68 69 |ook at t|he.// hi|
|00000db0| 67 68 20 62 79 74 65 20 | 6f 66 20 74 68 65 20 6d |gh byte |of the m|
|00000dc0| 65 73 73 61 67 65 20 73 | 65 6e 74 20 74 6f 20 64 |essage s|ent to d|
|00000dd0| 65 74 65 72 6d 69 6e 65 | 20 77 68 69 63 68 20 6b |etermine| which k|
|00000de0| 69 6e 64 20 69 74 20 69 | 73 2e 20 54 6f 20 64 69 |ind it i|s. To di|
|00000df0| 66 66 65 72 65 6e 74 69 | 61 74 65 0d 2f 2f 20 73 |fferenti|ate.// s|
|00000e00| 75 73 70 65 6e 64 20 61 | 6e 64 20 72 65 73 75 6d |uspend a|nd resum|
|00000e10| 65 20 65 76 65 6e 74 73 | 20 77 65 20 63 68 65 63 |e events| we chec|
|00000e20| 6b 20 74 68 65 20 72 65 | 73 75 6d 65 4d 61 73 6b |k the re|sumeMask|
|00000e30| 20 62 69 74 2e 0d 63 6f | 6e 73 74 20 73 68 6f 72 | bit..co|nst shor|
|00000e40| 74 20 6b 4f 73 45 76 65 | 6e 74 20 3d 20 61 70 70 |t kOsEve|nt = app|
|00000e50| 34 45 76 74 3b 09 09 09 | 09 2f 2f 20 65 76 65 6e |4Evt;...|.// even|
|00000e60| 74 20 75 73 65 64 20 62 | 79 20 4d 75 6c 74 69 46 |t used b|y MultiF|
|00000e70| 69 6e 64 65 72 0d 63 6f | 6e 73 74 20 73 68 6f 72 |inder.co|nst shor|
|00000e80| 74 20 6b 53 75 73 70 65 | 6e 64 52 65 73 75 6d 65 |t kSuspe|ndResume|
|00000e90| 4d 65 73 73 61 67 65 20 | 3d 20 30 78 30 31 3b 09 |Message |= 0x01;.|
|00000ea0| 2f 2f 20 68 69 67 68 20 | 62 79 74 65 20 6f 66 20 |// high |byte of |
|00000eb0| 73 75 73 70 65 6e 64 2f | 72 65 73 75 6d 65 20 65 |suspend/|resume e|
|00000ec0| 76 65 6e 74 20 6d 65 73 | 73 61 67 65 0d 63 6f 6e |vent mes|sage.con|
|00000ed0| 73 74 20 73 68 6f 72 74 | 20 6b 43 6c 69 70 43 6f |st short| kClipCo|
|00000ee0| 6e 76 65 72 74 4d 61 73 | 6b 20 3d 20 30 78 30 32 |nvertMas|k = 0x02|
|00000ef0| 3b 09 09 2f 2f 20 62 69 | 74 20 6f 66 20 6d 65 73 |;..// bi|t of mes|
|00000f00| 73 61 67 65 20 66 69 65 | 6c 64 20 63 6c 69 70 20 |sage fie|ld clip |
|00000f10| 63 6f 6e 76 65 72 73 69 | 6f 6e 0d 63 6f 6e 73 74 |conversi|on.const|
|00000f20| 20 73 68 6f 72 74 20 6b | 52 65 73 75 6d 65 4d 61 | short k|ResumeMa|
|00000f30| 73 6b 20 3d 20 30 78 30 | 31 3b 09 09 09 09 2f 2f |sk = 0x0|1;....//|
|00000f40| 20 62 69 74 20 6f 66 20 | 6d 65 73 73 61 67 65 20 | bit of |message |
|00000f50| 66 69 65 6c 64 20 66 6f | 72 20 72 65 73 75 6d 65 |field fo|r resume|
|00000f60| 20 76 73 2e 20 73 75 73 | 70 65 6e 64 0d 63 6f 6e | vs. sus|pend.con|
|00000f70| 73 74 20 73 68 6f 72 74 | 20 6b 4d 6f 75 73 65 4d |st short| kMouseM|
|00000f80| 6f 76 65 64 4d 65 73 73 | 61 67 65 20 3d 20 30 78 |ovedMess|age = 0x|
|00000f90| 46 41 3b 09 09 2f 2f 20 | 68 69 67 68 20 62 79 74 |FA;..// |high byt|
|00000fa0| 65 20 6f 66 20 6d 6f 75 | 73 65 2d 6d 6f 76 65 64 |e of mou|se-moved|
|00000fb0| 20 65 76 65 6e 74 20 6d | 65 73 73 61 67 65 0d 0d | event m|essage..|
|00000fc0| 2f 2f 20 44 65 66 69 6e | 65 20 48 69 57 72 64 20 |// Defin|e HiWrd |
|00000fd0| 61 6e 64 20 4c 6f 57 72 | 64 20 6d 61 63 72 6f 73 |and LoWr|d macros|
|00000fe0| 20 66 6f 72 20 65 66 66 | 69 63 69 65 6e 63 79 0d | for eff|iciency.|
|00000ff0| 23 64 65 66 69 6e 65 20 | 48 69 57 72 64 28 61 4c |#define |HiWrd(aL|
|00001000| 6f 6e 67 29 09 28 28 28 | 61 4c 6f 6e 67 29 20 3e |ong).(((|aLong) >|
|00001010| 3e 20 31 36 29 20 26 20 | 30 78 46 46 46 46 29 0d |> 16) & |0xFFFF).|
|00001020| 23 64 65 66 69 6e 65 20 | 4c 6f 57 72 64 28 61 4c |#define |LoWrd(aL|
|00001030| 6f 6e 67 29 09 28 28 61 | 4c 6f 6e 67 29 20 26 20 |ong).((a|Long) & |
|00001040| 30 78 46 46 46 46 29 0d | 0d 65 78 74 65 72 6e 20 |0xFFFF).|.extern |
|00001050| 22 43 22 20 7b 20 0d 09 | 2f 2f 20 66 72 6f 6d 20 |"C" { ..|// from |
|00001060| 4d 50 57 20 73 74 61 6e | 64 61 72 64 20 6c 69 62 |MPW stan|dard lib|
|00001070| 72 61 72 79 0d 09 76 6f | 69 64 20 5f 44 61 74 61 |rary..vo|id _Data|
|00001080| 49 6e 69 74 28 76 6f 69 | 64 29 3b 09 09 09 09 2f |Init(voi|d);..../|
|00001090| 2f 20 73 65 74 73 20 75 | 70 20 41 35 20 67 6c 6f |/ sets u|p A5 glo|
|000010a0| 62 61 6c 73 0d 7d 3b 0d | 0d 54 41 70 70 6c 69 63 |bals.};.|.TApplic|
|000010b0| 61 74 69 6f 6e 3a 3a 54 | 41 70 70 6c 69 63 61 74 |ation::T|Applicat|
|000010c0| 69 6f 6e 28 76 6f 69 64 | 29 0d 7b 0d 09 53 79 73 |ion(void|).{..Sys|
|000010d0| 45 6e 76 52 65 63 20 65 | 6e 76 52 65 63 3b 0d 09 |EnvRec e|nvRec;..|
|000010e0| 6c 6f 6e 67 20 73 74 6b | 4e 65 65 64 65 64 2c 20 |long stk|Needed, |
|000010f0| 68 65 61 70 53 69 7a 65 | 3b 0d 0d 09 2f 2f 20 69 |heapSize|;...// i|
|00001100| 6e 69 74 69 61 6c 69 7a | 65 20 4d 61 63 20 54 6f |nitializ|e Mac To|
|00001110| 6f 6c 62 6f 78 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |olbox co|mponents|
|00001120| 0d 09 49 6e 69 74 47 72 | 61 66 28 28 50 74 72 29 |..InitGr|af((Ptr)|
|00001130| 20 26 71 64 2e 74 68 65 | 50 6f 72 74 29 3b 0d 09 | &qd.the|Port);..|
|00001140| 49 6e 69 74 46 6f 6e 74 | 73 28 29 3b 0d 09 49 6e |InitFont|s();..In|
|00001150| 69 74 57 69 6e 64 6f 77 | 73 28 29 3b 0d 09 49 6e |itWindow|s();..In|
|00001160| 69 74 4d 65 6e 75 73 28 | 29 3b 0d 09 54 45 49 6e |itMenus(|);..TEIn|
|00001170| 69 74 28 29 3b 0d 09 49 | 6e 69 74 44 69 61 6c 6f |it();..I|nitDialo|
|00001180| 67 73 28 28 52 65 73 75 | 6d 65 50 72 6f 63 50 74 |gs((Resu|meProcPt|
|00001190| 72 29 20 6e 69 6c 29 3b | 0d 09 49 6e 69 74 43 75 |r) nil);|..InitCu|
|000011a0| 72 73 6f 72 28 29 3b 0d | 0d 09 2f 2f 20 55 6e 6c |rsor();.|..// Unl|
|000011b0| 6f 61 64 20 64 61 74 61 | 20 73 65 67 6d 65 6e 74 |oad data| segment|
|000011c0| 3a 20 6e 6f 74 65 20 74 | 68 61 74 20 5f 44 61 74 |: note t|hat _Dat|
|000011d0| 61 49 6e 69 74 20 6d 75 | 73 74 20 6e 6f 74 20 62 |aInit mu|st not b|
|000011e0| 65 20 69 6e 20 4d 61 69 | 6e 21 0d 09 55 6e 6c 6f |e in Mai|n!..Unlo|
|000011f0| 61 64 53 65 67 28 28 50 | 74 72 29 20 5f 44 61 74 |adSeg((P|tr) _Dat|
|00001200| 61 49 6e 69 74 29 3b 0d | 0d 09 2f 2f 20 69 67 6e |aInit);.|..// ign|
|00001210| 6f 72 65 20 74 68 65 20 | 65 72 72 6f 72 20 72 65 |ore the |error re|
|00001220| 74 75 72 6e 65 64 20 66 | 72 6f 6d 20 53 79 73 45 |turned f|rom SysE|
|00001230| 6e 76 69 72 6f 6e 73 3b | 20 65 76 65 6e 20 69 66 |nvirons;| even if|
|00001240| 20 61 6e 20 65 72 72 6f | 72 20 6f 63 63 75 72 72 | an erro|r occurr|
|00001250| 65 64 2c 0d 09 2f 2f 20 | 74 68 65 20 53 79 73 45 |ed,..// |the SysE|
|00001260| 6e 76 69 72 6f 6e 73 20 | 67 6c 75 65 20 77 69 6c |nvirons |glue wil|
|00001270| 6c 20 66 69 6c 6c 20 69 | 6e 20 74 68 65 20 53 79 |l fill i|n the Sy|
|00001280| 73 45 6e 76 52 65 63 0d | 09 28 76 6f 69 64 29 20 |sEnvRec.|.(void) |
|00001290| 53 79 73 45 6e 76 69 72 | 6f 6e 73 28 63 75 72 53 |SysEnvir|ons(curS|
|000012a0| 79 73 45 6e 76 56 65 72 | 73 2c 20 26 65 6e 76 52 |ysEnvVer|s, &envR|
|000012b0| 65 63 29 3b 0d 0d 09 2f | 2f 20 41 72 65 20 77 65 |ec);.../|/ Are we|
|000012c0| 20 72 75 6e 6e 69 6e 67 | 20 6f 6e 20 61 20 31 32 | running| on a 12|
|000012d0| 38 4b 20 52 4f 4d 20 6d | 61 63 68 69 6e 65 20 6f |8K ROM m|achine o|
|000012e0| 72 20 62 65 74 74 65 72 | 3f 3f 3f 0d 09 69 66 20 |r better|???..if |
|000012f0| 28 65 6e 76 52 65 63 2e | 6d 61 63 68 69 6e 65 54 |(envRec.|machineT|
|00001300| 79 70 65 20 3c 20 30 29 | 0d 09 20 20 42 69 67 42 |ype < 0)|.. BigB|
|00001310| 61 64 45 72 72 6f 72 28 | 6b 45 72 72 53 74 72 69 |adError(|kErrStri|
|00001320| 6e 67 73 2c 65 57 72 6f | 6e 67 4d 61 63 68 69 6e |ngs,eWro|ngMachin|
|00001330| 65 29 3b 09 09 2f 2f 20 | 69 66 20 6e 6f 74 2c 20 |e);..// |if not, |
|00001340| 61 6c 65 72 74 20 26 20 | 71 75 69 74 0d 0d 09 2f |alert & |quit.../|
|00001350| 2f 20 69 66 20 77 65 20 | 6e 65 65 64 20 6d 6f 72 |/ if we |need mor|
|00001360| 65 20 73 74 61 63 6b 20 | 73 70 61 63 65 2c 20 67 |e stack |space, g|
|00001370| 65 74 20 69 74 20 6e 6f | 77 0d 09 73 74 6b 4e 65 |et it no|w..stkNe|
|00001380| 65 64 65 64 20 3d 20 53 | 74 61 63 6b 4e 65 65 64 |eded = S|tackNeed|
|00001390| 65 64 28 29 3b 0d 09 69 | 66 20 28 73 74 6b 4e 65 |ed();..i|f (stkNe|
|000013a0| 65 64 65 64 20 3e 20 53 | 74 61 63 6b 53 70 61 63 |eded > S|tackSpac|
|000013b0| 65 28 29 29 0d 09 20 20 | 7b 0d 09 09 2f 2f 20 6e |e()).. |{...// n|
|000013c0| 65 77 20 61 64 64 72 65 | 73 73 20 69 73 20 68 65 |ew addre|ss is he|
|000013d0| 61 70 20 73 69 7a 65 20 | 2b 20 63 75 72 72 65 6e |ap size |+ curren|
|000013e0| 74 20 73 74 61 63 6b 20 | 2d 20 6e 65 65 64 65 64 |t stack |- needed|
|000013f0| 20 73 74 61 63 6b 0d 09 | 09 53 65 74 41 70 70 6c | stack..|.SetAppl|
|00001400| 4c 69 6d 69 74 28 28 50 | 74 72 29 20 28 28 6c 6f |Limit((P|tr) ((lo|
|00001410| 6e 67 29 20 47 65 74 41 | 70 70 6c 4c 69 6d 69 74 |ng) GetA|pplLimit|
|00001420| 28 29 20 2d 20 73 74 6b | 4e 65 65 64 65 64 20 2b |() - stk|Needed +|
|00001430| 20 53 74 61 63 6b 53 70 | 61 63 65 28 29 29 29 3b | StackSp|ace()));|
|00001440| 0d 09 20 20 7d 0d 0d 09 | 2f 2f 20 43 68 65 63 6b |.. }...|// Check|
|00001450| 20 66 6f 72 20 6d 69 6e | 69 6d 75 6d 20 68 65 61 | for min|imum hea|
|00001460| 70 20 73 69 7a 65 0d 09 | 68 65 61 70 53 69 7a 65 |p size..|heapSize|
|00001470| 20 3d 20 28 6c 6f 6e 67 | 29 20 47 65 74 41 70 70 | = (long|) GetApp|
|00001480| 6c 4c 69 6d 69 74 28 29 | 20 2d 20 28 6c 6f 6e 67 |lLimit()| - (long|
|00001490| 29 20 41 70 70 6c 69 63 | 5a 6f 6e 65 28 29 3b 0d |) Applic|Zone();.|
|000014a0| 09 69 66 20 28 68 65 61 | 70 53 69 7a 65 20 3c 20 |.if (hea|pSize < |
|000014b0| 48 65 61 70 4e 65 65 64 | 65 64 28 29 29 0d 09 20 |HeapNeed|ed()).. |
|000014c0| 20 42 69 67 42 61 64 45 | 72 72 6f 72 28 6b 45 72 | BigBadE|rror(kEr|
|000014d0| 72 53 74 72 69 6e 67 73 | 2c 65 53 6d 61 6c 6c 53 |rStrings|,eSmallS|
|000014e0| 69 7a 65 29 3b 0d 0d 09 | 2f 2f 20 65 78 70 61 6e |ize);...|// expan|
|000014f0| 64 20 74 68 65 20 68 65 | 61 70 20 73 6f 20 6e 65 |d the he|ap so ne|
|00001500| 77 20 63 6f 64 65 20 73 | 65 67 6d 65 6e 74 73 20 |w code s|egments |
|00001510| 6c 6f 61 64 20 61 74 20 | 74 68 65 20 74 6f 70 0d |load at |the top.|
|00001520| 09 4d 61 78 41 70 70 6c | 5a 6f 6e 65 28 29 3b 0d |.MaxAppl|Zone();.|
|00001530| 0d 09 2f 2f 20 61 6c 6c | 6f 63 61 74 65 20 61 6e |..// all|ocate an|
|00001540| 20 65 6d 70 74 79 20 64 | 6f 63 75 6d 65 6e 74 20 | empty d|ocument |
|00001550| 6c 69 73 74 0d 09 66 44 | 6f 63 4c 69 73 74 20 3d |list..fD|ocList =|
|00001560| 20 6e 65 77 20 54 44 6f | 63 75 6d 65 6e 74 4c 69 | new TDo|cumentLi|
|00001570| 73 74 3b 0d 0d 09 2f 2f | 20 63 68 65 63 6b 20 74 |st;...//| check t|
|00001580| 6f 20 73 65 65 20 69 66 | 20 57 61 69 74 4e 65 78 |o see if| WaitNex|
|00001590| 74 45 76 65 6e 74 20 69 | 73 20 69 6d 70 6c 65 6d |tEvent i|s implem|
|000015a0| 65 6e 74 65 64 0d 09 66 | 48 61 76 65 57 61 69 74 |ented..f|HaveWait|
|000015b0| 4e 65 78 74 45 76 65 6e | 74 20 3d 20 54 72 61 70 |NextEven|t = Trap|
|000015c0| 41 76 61 69 6c 61 62 6c | 65 28 5f 57 61 69 74 4e |Availabl|e(_WaitN|
|000015d0| 65 78 74 45 76 65 6e 74 | 2c 20 54 6f 6f 6c 54 72 |extEvent|, ToolTr|
|000015e0| 61 70 29 3b 0d 0d 09 2f | 2f 20 69 6e 69 74 69 61 |ap);.../|/ initia|
|000015f0| 6c 69 7a 65 20 6f 75 72 | 20 63 6c 61 73 73 20 76 |lize our| class v|
|00001600| 61 72 69 61 62 6c 65 73 | 0d 09 66 43 75 72 44 6f |ariables|..fCurDo|
|00001610| 63 20 3d 20 6e 69 6c 3b | 0d 09 66 44 6f 6e 65 20 |c = nil;|..fDone |
|00001620| 3d 20 66 61 6c 73 65 3b | 0d 09 66 49 6e 42 61 63 |= false;|..fInBac|
|00001630| 6b 67 72 6f 75 6e 64 20 | 3d 20 66 61 6c 73 65 3b |kground |= false;|
|00001640| 0d 09 66 4d 6f 75 73 65 | 52 67 6e 20 3d 20 6e 69 |..fMouse|Rgn = ni|
|00001650| 6c 3b 0d 09 66 57 68 69 | 63 68 57 69 6e 64 6f 77 |l;..fWhi|chWindow|
|00001660| 20 3d 20 6e 69 6c 3b 0d | 7d 0d 0d 76 6f 69 64 20 | = nil;.|}..void |
|00001670| 54 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 45 78 |TApplica|tion::Ex|
|00001680| 69 74 4c 6f 6f 70 28 76 | 6f 69 64 29 0d 7b 0d 09 |itLoop(v|oid).{..|
|00001690| 66 44 6f 6e 65 20 3d 20 | 74 72 75 65 3b 0d 7d 0d |fDone = |true;.}.|
|000016a0| 0d 76 6f 69 64 20 54 41 | 70 70 6c 69 63 61 74 69 |.void TA|pplicati|
|000016b0| 6f 6e 3a 3a 45 76 65 6e | 74 4c 6f 6f 70 28 76 6f |on::Even|tLoop(vo|
|000016c0| 69 64 29 0d 7b 0d 09 69 | 6e 74 20 67 6f 74 45 76 |id).{..i|nt gotEv|
|000016d0| 65 6e 74 3b 0d 09 45 76 | 65 6e 74 52 65 63 6f 72 |ent;..Ev|entRecor|
|000016e0| 64 20 74 45 76 74 3b 0d | 0d 09 53 65 74 55 70 28 |d tEvt;.|..SetUp(|
|000016f0| 29 3b 09 09 09 09 09 2f | 2f 20 63 61 6c 6c 20 73 |);...../|/ call s|
|00001700| 65 74 75 70 20 72 6f 75 | 74 69 6e 65 0d 09 44 6f |etup rou|tine..Do|
|00001710| 49 64 6c 65 28 29 3b 09 | 09 09 09 09 2f 2f 20 64 |Idle();.|....// d|
|00001720| 6f 20 69 64 6c 65 20 6f | 6e 63 65 0d 0d 09 77 68 |o idle o|nce...wh|
|00001730| 69 6c 65 20 28 66 44 6f | 6e 65 20 3d 3d 20 66 61 |ile (fDo|ne == fa|
|00001740| 6c 73 65 29 0d 09 20 20 | 7b 0d 09 09 2f 2f 20 61 |lse).. |{...// a|
|00001750| 6c 77 61 79 73 20 73 65 | 74 20 75 70 20 66 57 68 |lways se|t up fWh|
|00001760| 69 63 68 57 69 6e 64 6f | 77 20 62 65 66 6f 72 65 |ichWindo|w before|
|00001770| 20 64 6f 69 6e 67 20 61 | 6e 79 74 68 69 6e 67 0d | doing a|nything.|
|00001780| 09 09 66 57 68 69 63 68 | 57 69 6e 64 6f 77 20 3d |..fWhich|Window =|
|00001790| 20 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 3b 0d | FrontWi|ndow();.|
|000017a0| 09 09 2f 2f 20 73 65 65 | 20 69 66 20 77 69 6e 64 |..// see| if wind|
|000017b0| 6f 77 20 62 65 6c 6f 6e | 67 73 20 74 6f 20 61 20 |ow belon|gs to a |
|000017c0| 64 6f 63 75 6d 65 6e 74 | 0d 09 09 66 43 75 72 44 |document|...fCurD|
|000017d0| 6f 63 20 3d 20 66 44 6f | 63 4c 69 73 74 2d 3e 46 |oc = fDo|cList->F|
|000017e0| 69 6e 64 44 6f 63 28 66 | 57 68 69 63 68 57 69 6e |indDoc(f|WhichWin|
|000017f0| 64 6f 77 29 3b 0d 09 09 | 2f 2f 20 6d 61 6b 65 20 |dow);...|// make |
|00001800| 73 75 72 65 20 77 65 20 | 61 6c 77 61 79 73 20 64 |sure we |always d|
|00001810| 72 61 77 20 69 6e 74 6f | 20 63 6f 72 72 65 63 74 |raw into| correct|
|00001820| 20 77 69 6e 64 6f 77 0d | 09 09 53 65 74 50 6f 72 | window.|..SetPor|
|00001830| 74 28 66 57 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |t(fWhich|Window);|
|00001840| 0d 0d 09 09 44 6f 49 64 | 6c 65 28 29 3b 09 09 09 |....DoId|le();...|
|00001850| 2f 2f 20 63 61 6c 6c 20 | 69 64 6c 65 20 74 69 6d |// call |idle tim|
|00001860| 65 20 68 61 6e 64 6c 65 | 72 0d 09 09 0d 09 09 69 |e handle|r......i|
|00001870| 66 20 28 66 48 61 76 65 | 57 61 69 74 4e 65 78 74 |f (fHave|WaitNext|
|00001880| 45 76 65 6e 74 29 0d 09 | 09 20 20 7b 0d 09 09 09 |Event)..|. {....|
|00001890| 67 6f 74 45 76 65 6e 74 | 20 3d 20 57 61 69 74 4e |gotEvent| = WaitN|
|000018a0| 65 78 74 45 76 65 6e 74 | 28 65 76 65 72 79 45 76 |extEvent|(everyEv|
|000018b0| 65 6e 74 2c 20 26 74 45 | 76 74 2c 20 53 6c 65 65 |ent, &tE|vt, Slee|
|000018c0| 70 56 61 6c 28 29 2c 20 | 66 4d 6f 75 73 65 52 67 |pVal(), |fMouseRg|
|000018d0| 6e 29 3b 0d 09 09 20 20 | 7d 0d 09 09 65 6c 73 65 |n);... |}...else|
|000018e0| 0d 09 09 20 20 7b 0d 09 | 09 09 53 79 73 74 65 6d |... {..|..System|
|000018f0| 54 61 73 6b 28 29 3b 0d | 09 09 09 67 6f 74 45 76 |Task();.|...gotEv|
|00001900| 65 6e 74 20 3d 20 47 65 | 74 4e 65 78 74 45 76 65 |ent = Ge|tNextEve|
|00001910| 6e 74 28 65 76 65 72 79 | 45 76 65 6e 74 2c 20 26 |nt(every|Event, &|
|00001920| 74 45 76 74 29 3b 0d 09 | 09 20 20 7d 0d 09 09 66 |tEvt);..|. }...f|
|00001930| 54 68 65 45 76 65 6e 74 | 20 3d 20 74 45 76 74 3b |TheEvent| = tEvt;|
|00001940| 0d 0d 09 09 2f 2f 20 6d | 61 6b 65 20 73 75 72 65 |....// m|ake sure|
|00001950| 20 77 65 20 67 6f 74 20 | 61 20 72 65 61 6c 20 65 | we got |a real e|
|00001960| 76 65 6e 74 0d 09 09 69 | 66 20 28 20 67 6f 74 45 |vent...i|f ( gotE|
|00001970| 76 65 6e 74 20 29 0d 09 | 09 20 20 7b 0d 09 09 09 |vent )..|. {....|
|00001980| 41 64 6a 75 73 74 43 75 | 72 73 6f 72 28 29 3b 0d |AdjustCu|rsor();.|
|00001990| 09 09 09 73 77 69 74 63 | 68 20 28 66 54 68 65 45 |...switc|h (fTheE|
|000019a0| 76 65 6e 74 2e 77 68 61 | 74 29 0d 09 09 09 20 20 |vent.wha|t).... |
|000019b0| 7b 0d 09 09 09 09 63 61 | 73 65 20 6d 6f 75 73 65 |{.....ca|se mouse|
|000019c0| 44 6f 77 6e 20 3a 0d 09 | 09 09 09 09 44 6f 4d 6f |Down :..|....DoMo|
|000019d0| 75 73 65 44 6f 77 6e 28 | 29 3b 0d 09 09 09 09 09 |useDown(|);......|
|000019e0| 62 72 65 61 6b 3b 0d 09 | 09 09 09 63 61 73 65 20 |break;..|...case |
|000019f0| 6d 6f 75 73 65 55 70 20 | 3a 0d 09 09 09 09 09 44 |mouseUp |:......D|
|00001a00| 6f 4d 6f 75 73 65 55 70 | 28 29 3b 0d 09 09 09 09 |oMouseUp|();.....|
|00001a10| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 63 61 73 65 |.break;.|....case|
|00001a20| 20 6b 65 79 44 6f 77 6e | 20 3a 0d 09 09 09 09 63 | keyDown| :.....c|
|00001a30| 61 73 65 20 61 75 74 6f | 4b 65 79 20 3a 0d 09 09 |ase auto|Key :...|
|00001a40| 09 09 09 44 6f 4b 65 79 | 44 6f 77 6e 28 29 3b 0d |...DoKey|Down();.|
|00001a50| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|00001a60| 63 61 73 65 20 75 70 64 | 61 74 65 45 76 74 20 3a |case upd|ateEvt :|
|00001a70| 0d 09 09 09 09 09 44 6f | 55 70 64 61 74 65 45 76 |......Do|UpdateEv|
|00001a80| 74 28 29 3b 09 09 09 09 | 0d 09 09 09 09 09 62 72 |t();....|......br|
|00001a90| 65 61 6b 3b 0d 09 09 09 | 09 63 61 73 65 20 64 69 |eak;....|.case di|
|00001aa0| 73 6b 45 76 74 20 3a 0d | 09 09 09 09 09 44 6f 44 |skEvt :.|.....DoD|
|00001ab0| 69 73 6b 45 76 74 28 29 | 3b 0d 09 09 09 09 09 62 |iskEvt()|;......b|
|00001ac0| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 61 |reak;...|..case a|
|00001ad0| 63 74 69 76 61 74 65 45 | 76 74 20 3a 0d 09 09 09 |ctivateE|vt :....|
|00001ae0| 09 09 44 6f 41 63 74 69 | 76 61 74 65 45 76 74 28 |..DoActi|vateEvt(|
|00001af0| 29 3b 0d 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |);......|break;..|
|00001b00| 09 09 09 63 61 73 65 20 | 6b 4f 73 45 76 65 6e 74 |...case |kOsEvent|
|00001b10| 20 3a 0d 09 09 09 09 09 | 44 6f 4f 53 45 76 65 6e | :......|DoOSEven|
|00001b20| 74 28 29 3b 0d 09 09 09 | 09 09 62 72 65 61 6b 3b |t();....|..break;|
|00001b30| 0d 09 09 09 09 64 65 66 | 61 75 6c 74 20 3a 0d 09 |.....def|ault :..|
|00001b40| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 20 20 |....brea|k;.... |
|00001b50| 7d 20 2f 2f 20 65 6e 64 | 20 73 77 69 74 63 68 20 |} // end| switch |
|00001b60| 28 66 54 68 65 45 76 65 | 6e 74 2e 77 68 61 74 29 |(fTheEve|nt.what)|
|00001b70| 0d 09 09 20 20 7d 0d 09 | 09 41 64 6a 75 73 74 43 |... }..|.AdjustC|
|00001b80| 75 72 73 6f 72 28 29 3b | 0d 09 20 20 7d 0d 09 2f |ursor();|.. }../|
|00001b90| 2f 20 63 61 6c 6c 20 63 | 6c 65 61 6e 75 70 20 68 |/ call c|leanup h|
|00001ba0| 61 6e 64 6c 65 72 0d 09 | 43 6c 65 61 6e 55 70 28 |andler..|CleanUp(|
|00001bb0| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 54 41 70 70 6c |);.}..vo|id TAppl|
|00001bc0| 69 63 61 74 69 6f 6e 3a | 3a 44 6f 4b 65 79 44 6f |ication:|:DoKeyDo|
|00001bd0| 77 6e 28 76 6f 69 64 29 | 0d 7b 0d 09 63 68 61 72 |wn(void)|.{..char|
|00001be0| 20 6b 65 79 3b 0d 09 6c | 6f 6e 67 20 6d 52 65 73 | key;..l|ong mRes|
|00001bf0| 75 6c 74 3b 0d 0d 09 6b | 65 79 20 3d 20 28 63 68 |ult;...k|ey = (ch|
|00001c00| 61 72 29 20 28 66 54 68 | 65 45 76 65 6e 74 2e 6d |ar) (fTh|eEvent.m|
|00001c10| 65 73 73 61 67 65 20 26 | 20 63 68 61 72 43 6f 64 |essage &| charCod|
|00001c20| 65 4d 61 73 6b 29 3b 0d | 09 69 66 20 28 28 66 54 |eMask);.|.if ((fT|
|00001c30| 68 65 45 76 65 6e 74 2e | 6d 6f 64 69 66 69 65 72 |heEvent.|modifier|
|00001c40| 73 20 26 20 63 6d 64 4b | 65 79 29 20 26 26 20 28 |s & cmdK|ey) && (|
|00001c50| 66 54 68 65 45 76 65 6e | 74 2e 77 68 61 74 20 3d |fTheEven|t.what =|
|00001c60| 3d 20 6b 65 79 44 6f 77 | 6e 29 29 0d 09 20 20 7b |= keyDow|n)).. {|
|00001c70| 0d 09 09 2f 2f 20 6f 6e | 6c 79 20 64 6f 20 63 6f |...// on|ly do co|
|00001c80| 6d 6d 61 6e 64 20 6b 65 | 79 73 20 69 66 20 77 65 |mmand ke|ys if we|
|00001c90| 20 61 72 65 20 6e 6f 74 | 20 61 75 74 6f 6b 65 79 | are not| autokey|
|00001ca0| 69 6e 67 0d 09 09 41 64 | 6a 75 73 74 4d 65 6e 75 |ing...Ad|justMenu|
|00001cb0| 73 28 29 3b 09 09 09 09 | 09 2f 2f 20 6d 61 6b 65 |s();....|.// make|
|00001cc0| 20 73 75 72 65 20 6d 65 | 6e 75 73 20 61 72 65 20 | sure me|nus are |
|00001cd0| 75 70 20 74 6f 20 64 61 | 74 65 0d 09 09 6d 52 65 |up to da|te...mRe|
|00001ce0| 73 75 6c 74 20 3d 20 4d | 65 6e 75 4b 65 79 28 6b |sult = M|enuKey(k|
|00001cf0| 65 79 29 3b 0d 09 09 69 | 66 20 28 6d 52 65 73 75 |ey);...i|f (mResu|
|00001d00| 6c 74 20 21 3d 20 30 29 | 09 09 09 09 2f 2f 20 69 |lt != 0)|....// i|
|00001d10| 66 20 69 74 20 77 61 73 | 6e 27 74 20 61 20 6d 65 |f it was|n't a me|
|00001d20| 6e 75 20 6b 65 79 2c 20 | 70 61 73 73 20 69 74 20 |nu key, |pass it |
|00001d30| 74 68 72 6f 75 67 68 0d | 09 09 20 20 7b 0d 09 09 |through.|.. {...|
|00001d40| 09 44 6f 4d 65 6e 75 43 | 6f 6d 6d 61 6e 64 28 48 |.DoMenuC|ommand(H|
|00001d50| 69 57 72 64 28 6d 52 65 | 73 75 6c 74 29 2c 20 4c |iWrd(mRe|sult), L|
|00001d60| 6f 57 72 64 28 6d 52 65 | 73 75 6c 74 29 29 3b 0d |oWrd(mRe|sult));.|
|00001d70| 09 09 09 72 65 74 75 72 | 6e 3b 0d 09 09 20 20 7d |...retur|n;... }|
|00001d80| 0d 09 20 20 7d 0d 09 69 | 66 20 28 66 43 75 72 44 |.. }..i|f (fCurD|
|00001d90| 6f 63 20 21 3d 20 6e 69 | 6c 29 0d 09 20 20 7b 0d |oc != ni|l).. {.|
|00001da0| 09 09 45 76 65 6e 74 52 | 65 63 6f 72 64 20 74 45 |..EventR|ecord tE|
|00001db0| 76 74 3b 0d 0d 09 09 2f | 2f 20 77 65 20 63 6f 70 |vt;..../|/ we cop|
|00001dc0| 79 20 65 76 65 6e 74 20 | 72 65 63 6f 72 64 20 73 |y event |record s|
|00001dd0| 6f 20 74 68 61 74 20 77 | 65 20 64 6f 6e 27 74 20 |o that w|e don't |
|00001de0| 70 61 73 73 20 72 65 66 | 65 72 65 6e 63 65 20 74 |pass ref|erence t|
|00001df0| 6f 20 6f 62 6a 65 63 74 | 20 66 69 65 6c 64 20 0d |o object| field .|
|00001e00| 09 09 74 45 76 74 20 3d | 20 66 54 68 65 45 76 65 |..tEvt =| fTheEve|
|00001e10| 6e 74 3b 0d 09 09 66 43 | 75 72 44 6f 63 2d 3e 44 |nt;...fC|urDoc->D|
|00001e20| 6f 4b 65 79 44 6f 77 6e | 28 26 74 45 76 74 29 3b |oKeyDown|(&tEvt);|
|00001e30| 0d 09 20 20 7d 0d 7d 0d | 0d 76 6f 69 64 20 54 41 |.. }.}.|.void TA|
|00001e40| 70 70 6c 69 63 61 74 69 | 6f 6e 3a 3a 44 6f 41 63 |pplicati|on::DoAc|
|00001e50| 74 69 76 61 74 65 45 76 | 74 28 76 6f 69 64 29 0d |tivateEv|t(void).|
|00001e60| 7b 0d 09 2f 2f 20 65 76 | 65 6e 74 20 72 65 63 6f |{..// ev|ent reco|
|00001e70| 72 64 20 63 6f 6e 74 61 | 69 6e 73 20 77 69 6e 64 |rd conta|ins wind|
|00001e80| 6f 77 20 70 74 72 0d 09 | 66 57 68 69 63 68 57 69 |ow ptr..|fWhichWi|
|00001e90| 6e 64 6f 77 20 3d 20 28 | 57 69 6e 64 6f 77 50 74 |ndow = (|WindowPt|
|00001ea0| 72 29 20 66 54 68 65 45 | 76 65 6e 74 2e 6d 65 73 |r) fTheE|vent.mes|
|00001eb0| 73 61 67 65 3b 0d 09 2f | 2f 20 73 65 65 20 69 66 |sage;../|/ see if|
|00001ec0| 20 77 69 6e 64 6f 77 20 | 62 65 6c 6f 6e 67 73 20 | window |belongs |
|00001ed0| 74 6f 20 61 20 64 6f 63 | 75 6d 65 6e 74 0d 09 66 |to a doc|ument..f|
|00001ee0| 43 75 72 44 6f 63 20 3d | 20 66 44 6f 63 4c 69 73 |CurDoc =| fDocLis|
|00001ef0| 74 2d 3e 46 69 6e 64 44 | 6f 63 28 66 57 68 69 63 |t->FindD|oc(fWhic|
|00001f00| 68 57 69 6e 64 6f 77 29 | 3b 0d 09 53 65 74 50 6f |hWindow)|;..SetPo|
|00001f10| 72 74 28 66 57 68 69 63 | 68 57 69 6e 64 6f 77 29 |rt(fWhic|hWindow)|
|00001f20| 3b 0d 0d 09 69 66 20 28 | 66 43 75 72 44 6f 63 20 |;...if (|fCurDoc |
|00001f30| 21 3d 20 6e 69 6c 29 0d | 09 20 20 66 43 75 72 44 |!= nil).|. fCurD|
|00001f40| 6f 63 2d 3e 44 6f 41 63 | 74 69 76 61 74 65 28 28 |oc->DoAc|tivate((|
|00001f50| 66 54 68 65 45 76 65 6e | 74 2e 6d 6f 64 69 66 69 |fTheEven|t.modifi|
|00001f60| 65 72 73 20 26 20 61 63 | 74 69 76 65 46 6c 61 67 |ers & ac|tiveFlag|
|00001f70| 29 20 21 3d 20 30 29 3b | 0d 7d 0d 0d 76 6f 69 64 |) != 0);|.}..void|
|00001f80| 20 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 3a 3a 44 | TApplic|ation::D|
|00001f90| 6f 55 70 64 61 74 65 45 | 76 74 28 76 6f 69 64 29 |oUpdateE|vt(void)|
|00001fa0| 0d 7b 0d 09 2f 2f 20 65 | 76 65 6e 74 20 72 65 63 |.{..// e|vent rec|
|00001fb0| 6f 72 64 20 63 6f 6e 74 | 61 69 6e 73 20 77 69 6e |ord cont|ains win|
|00001fc0| 64 6f 77 20 70 74 72 0d | 09 66 57 68 69 63 68 57 |dow ptr.|.fWhichW|
|00001fd0| 69 6e 64 6f 77 20 3d 20 | 28 57 69 6e 64 6f 77 50 |indow = |(WindowP|
|00001fe0| 74 72 29 20 66 54 68 65 | 45 76 65 6e 74 2e 6d 65 |tr) fThe|Event.me|
|00001ff0| 73 73 61 67 65 3b 0d 09 | 2f 2f 20 73 65 65 20 69 |ssage;..|// see i|
|00002000| 66 20 77 69 6e 64 6f 77 | 20 62 65 6c 6f 6e 67 73 |f window| belongs|
|00002010| 20 74 6f 20 61 20 64 6f | 63 75 6d 65 6e 74 0d 09 | to a do|cument..|
|00002020| 66 43 75 72 44 6f 63 20 | 3d 20 66 44 6f 63 4c 69 |fCurDoc |= fDocLi|
|00002030| 73 74 2d 3e 46 69 6e 64 | 44 6f 63 28 66 57 68 69 |st->Find|Doc(fWhi|
|00002040| 63 68 57 69 6e 64 6f 77 | 29 3b 0d 09 53 65 74 50 |chWindow|);..SetP|
|00002050| 6f 72 74 28 66 57 68 69 | 63 68 57 69 6e 64 6f 77 |ort(fWhi|chWindow|
|00002060| 29 3b 0d 0d 09 69 66 20 | 28 66 43 75 72 44 6f 63 |);...if |(fCurDoc|
|00002070| 20 21 3d 20 6e 69 6c 29 | 0d 09 20 20 66 43 75 72 | != nil)|.. fCur|
|00002080| 44 6f 63 2d 3e 44 6f 55 | 70 64 61 74 65 28 29 3b |Doc->DoU|pdate();|
|00002090| 0d 7d 0d 0d 76 6f 69 64 | 20 54 41 70 70 6c 69 63 |.}..void| TApplic|
|000020a0| 61 74 69 6f 6e 3a 3a 44 | 6f 53 75 73 70 65 6e 64 |ation::D|oSuspend|
|000020b0| 28 42 6f 6f 6c 65 61 6e | 20 64 6f 43 6c 69 70 43 |(Boolean| doClipC|
|000020c0| 6f 6e 76 65 72 74 29 0d | 7b 0d 09 64 6f 43 6c 69 |onvert).|{..doCli|
|000020d0| 70 43 6f 6e 76 65 72 74 | 20 3d 20 66 61 6c 73 65 |pConvert| = false|
|000020e0| 3b 09 09 2f 2f 20 74 68 | 69 73 20 69 73 20 68 65 |;..// th|is is he|
|000020f0| 72 65 20 62 65 63 61 75 | 73 65 20 49 20 48 41 54 |re becau|se I HAT|
|00002100| 45 20 63 6f 6d 70 69 6c | 65 72 20 77 61 72 6e 69 |E compil|er warni|
|00002110| 6e 67 73 21 21 0d 09 69 | 66 20 28 66 43 75 72 44 |ngs!!..i|f (fCurD|
|00002120| 6f 63 20 21 3d 20 6e 69 | 6c 29 0d 09 20 20 66 43 |oc != ni|l).. fC|
|00002130| 75 72 44 6f 63 2d 3e 44 | 6f 41 63 74 69 76 61 74 |urDoc->D|oActivat|
|00002140| 65 28 21 66 49 6e 42 61 | 63 6b 67 72 6f 75 6e 64 |e(!fInBa|ckground|
|00002150| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 54 41 70 70 6c |);.}..vo|id TAppl|
|00002160| 69 63 61 74 69 6f 6e 3a | 3a 44 6f 52 65 73 75 6d |ication:|:DoResum|
|00002170| 65 28 42 6f 6f 6c 65 61 | 6e 20 64 6f 43 6c 69 70 |e(Boolea|n doClip|
|00002180| 43 6f 6e 76 65 72 74 29 | 0d 7b 0d 09 64 6f 43 6c |Convert)|.{..doCl|
|00002190| 69 70 43 6f 6e 76 65 72 | 74 20 3d 20 66 61 6c 73 |ipConver|t = fals|
|000021a0| 65 3b 09 09 2f 2f 20 74 | 68 69 73 20 69 73 20 68 |e;..// t|his is h|
|000021b0| 65 72 65 20 62 65 63 61 | 75 73 65 20 49 20 48 41 |ere beca|use I HA|
|000021c0| 54 45 20 63 6f 6d 70 69 | 6c 65 72 20 77 61 72 6e |TE compi|ler warn|
|000021d0| 69 6e 67 73 21 21 0d 09 | 69 66 20 28 66 43 75 72 |ings!!..|if (fCur|
|000021e0| 44 6f 63 20 21 3d 20 6e | 69 6c 29 0d 09 20 20 66 |Doc != n|il).. f|
|000021f0| 43 75 72 44 6f 63 2d 3e | 44 6f 41 63 74 69 76 61 |CurDoc->|DoActiva|
|00002200| 74 65 28 21 66 49 6e 42 | 61 63 6b 67 72 6f 75 6e |te(!fInB|ackgroun|
|00002210| 64 29 3b 0d 7d 0d 0d 76 | 6f 69 64 20 54 41 70 70 |d);.}..v|oid TApp|
|00002220| 6c 69 63 61 74 69 6f 6e | 3a 3a 44 6f 4f 53 45 76 |lication|::DoOSEv|
|00002230| 65 6e 74 28 76 6f 69 64 | 29 0d 7b 0d 09 42 6f 6f |ent(void|).{..Boo|
|00002240| 6c 65 61 6e 20 64 6f 43 | 6f 6e 76 65 72 74 3b 0d |lean doC|onvert;.|
|00002250| 09 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 65 |.unsigne|d char e|
|00002260| 76 54 79 70 65 3b 0d 0d | 09 2f 2f 20 69 73 20 69 |vType;..|.// is i|
|00002270| 74 20 61 20 6d 75 6c 74 | 69 66 69 6e 64 65 72 20 |t a mult|ifinder |
|00002280| 65 76 65 6e 74 3f 0d 09 | 65 76 54 79 70 65 20 3d |event?..|evType =|
|00002290| 20 28 66 54 68 65 45 76 | 65 6e 74 2e 6d 65 73 73 | (fTheEv|ent.mess|
|000022a0| 61 67 65 20 3e 3e 20 32 | 34 29 20 26 20 30 78 30 |age >> 2|4) & 0x0|
|000022b0| 30 66 66 3b 0d 09 73 77 | 69 74 63 68 20 28 65 76 |0ff;..sw|itch (ev|
|000022c0| 54 79 70 65 29 20 7b 20 | 09 2f 2f 20 68 69 67 68 |Type) { |.// high|
|000022d0| 20 62 79 74 65 20 6f 66 | 20 6d 65 73 73 61 67 65 | byte of| message|
|000022e0| 20 69 73 20 74 79 70 65 | 20 6f 66 20 65 76 65 6e | is type| of even|
|000022f0| 74 0d 09 09 63 61 73 65 | 20 6b 4d 6f 75 73 65 4d |t...case| kMouseM|
|00002300| 6f 76 65 64 4d 65 73 73 | 61 67 65 20 3a 0d 09 09 |ovedMess|age :...|
|00002310| 09 44 6f 49 64 6c 65 28 | 29 3b 09 09 09 09 09 2f |.DoIdle(|);...../|
|00002320| 2f 20 6d 6f 75 73 65 2d | 6d 6f 76 65 64 20 69 73 |/ mouse-|moved is|
|00002330| 20 61 6c 73 6f 20 61 6e | 20 69 64 6c 65 20 65 76 | also an| idle ev|
|00002340| 65 6e 74 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |ent....b|reak;...|
|00002350| 63 61 73 65 20 6b 53 75 | 73 70 65 6e 64 52 65 73 |case kSu|spendRes|
|00002360| 75 6d 65 4d 65 73 73 61 | 67 65 20 3a 0d 09 09 09 |umeMessa|ge :....|
|00002370| 64 6f 43 6f 6e 76 65 72 | 74 20 3d 20 28 66 54 68 |doConver|t = (fTh|
|00002380| 65 45 76 65 6e 74 2e 6d | 65 73 73 61 67 65 20 26 |eEvent.m|essage &|
|00002390| 20 6b 43 6c 69 70 43 6f | 6e 76 65 72 74 4d 61 73 | kClipCo|nvertMas|
|000023a0| 6b 29 20 21 3d 20 30 3b | 0d 09 09 09 66 49 6e 42 |k) != 0;|....fInB|
|000023b0| 61 63 6b 67 72 6f 75 6e | 64 20 3d 20 28 66 54 68 |ackgroun|d = (fTh|
|000023c0| 65 45 76 65 6e 74 2e 6d | 65 73 73 61 67 65 20 26 |eEvent.m|essage &|
|000023d0| 20 6b 52 65 73 75 6d 65 | 4d 61 73 6b 29 20 3d 3d | kResume|Mask) ==|
|000023e0| 20 30 3b 0d 09 09 09 69 | 66 20 28 66 49 6e 42 61 | 0;....i|f (fInBa|
|000023f0| 63 6b 67 72 6f 75 6e 64 | 29 0d 09 09 09 20 20 44 |ckground|).... D|
|00002400| 6f 53 75 73 70 65 6e 64 | 28 64 6f 43 6f 6e 76 65 |oSuspend|(doConve|
|00002410| 72 74 29 3b 0d 09 09 09 | 65 6c 73 65 20 44 6f 52 |rt);....|else DoR|
|00002420| 65 73 75 6d 65 28 64 6f | 43 6f 6e 76 65 72 74 29 |esume(do|Convert)|
|00002430| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 7d 0d 7d |;....bre|ak;..}.}|
|00002440| 0d 0d 76 6f 69 64 20 54 | 41 70 70 6c 69 63 61 74 |..void T|Applicat|
|00002450| 69 6f 6e 3a 3a 44 6f 4d | 6f 75 73 65 44 6f 77 6e |ion::DoM|ouseDown|
|00002460| 28 76 6f 69 64 29 0d 7b | 0d 09 6c 6f 6e 67 20 6d |(void).{|..long m|
|00002470| 52 65 73 75 6c 74 3b 0d | 09 73 68 6f 72 74 20 70 |Result;.|.short p|
|00002480| 61 72 74 43 6f 64 65 3b | 0d 09 57 69 6e 64 6f 77 |artCode;|..Window|
|00002490| 50 74 72 20 74 57 69 6e | 64 3b 0d 09 45 76 65 6e |Ptr tWin|d;..Even|
|000024a0| 74 52 65 63 6f 72 64 20 | 74 45 76 74 3b 0d 0d 09 |tRecord |tEvt;...|
|000024b0| 2f 2f 20 67 6f 74 74 61 | 20 77 61 74 63 68 20 74 |// gotta| watch t|
|000024c0| 68 6f 73 65 20 6f 62 6a | 65 63 74 20 66 69 65 6c |hose obj|ect fiel|
|000024d0| 64 20 64 65 72 65 66 65 | 72 65 6e 63 65 73 0d 09 |d derefe|rences..|
|000024e0| 70 61 72 74 43 6f 64 65 | 20 3d 20 46 69 6e 64 57 |partCode| = FindW|
|000024f0| 69 6e 64 6f 77 28 66 54 | 68 65 45 76 65 6e 74 2e |indow(fT|heEvent.|
|00002500| 77 68 65 72 65 2c 20 26 | 74 57 69 6e 64 29 3b 0d |where, &|tWind);.|
|00002510| 09 66 57 68 69 63 68 57 | 69 6e 64 6f 77 20 3d 20 |.fWhichW|indow = |
|00002520| 74 57 69 6e 64 3b 0d 09 | 74 45 76 74 20 3d 20 66 |tWind;..|tEvt = f|
|00002530| 54 68 65 45 76 65 6e 74 | 3b 0d 09 73 77 69 74 63 |TheEvent|;..switc|
|00002540| 68 20 28 70 61 72 74 43 | 6f 64 65 29 0d 09 20 20 |h (partC|ode).. |
|00002550| 7b 0d 09 09 63 61 73 65 | 20 69 6e 53 79 73 57 69 |{...case| inSysWi|
|00002560| 6e 64 6f 77 20 3a 0d 09 | 09 09 44 6f 4d 6f 75 73 |ndow :..|..DoMous|
|00002570| 65 49 6e 53 79 73 57 69 | 6e 64 6f 77 28 29 3b 0d |eInSysWi|ndow();.|
|00002580| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00002590| 20 69 6e 4d 65 6e 75 42 | 61 72 20 3a 0d 09 09 09 | inMenuB|ar :....|
|000025a0| 41 64 6a 75 73 74 4d 65 | 6e 75 73 28 29 3b 0d 09 |AdjustMe|nus();..|
|000025b0| 09 09 6d 52 65 73 75 6c | 74 20 3d 20 4d 65 6e 75 |..mResul|t = Menu|
|000025c0| 53 65 6c 65 63 74 28 74 | 45 76 74 2e 77 68 65 72 |Select(t|Evt.wher|
|000025d0| 65 29 3b 0d 09 09 09 69 | 66 20 28 6d 52 65 73 75 |e);....i|f (mResu|
|000025e0| 6c 74 20 21 3d 20 30 29 | 0d 09 09 09 20 20 44 6f |lt != 0)|.... Do|
|000025f0| 4d 65 6e 75 43 6f 6d 6d | 61 6e 64 28 48 69 57 72 |MenuComm|and(HiWr|
|00002600| 64 28 6d 52 65 73 75 6c | 74 29 2c 4c 6f 57 72 64 |d(mResul|t),LoWrd|
|00002610| 28 6d 52 65 73 75 6c 74 | 29 29 3b 0d 09 09 09 62 |(mResult|));....b|
|00002620| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 69 6e 47 |reak;...|case inG|
|00002630| 6f 41 77 61 79 20 3a 0d | 09 09 09 44 6f 47 6f 41 |oAway :.|...DoGoA|
|00002640| 77 61 79 28 29 3b 09 09 | 09 09 09 0d 09 09 09 62 |way();..|.......b|
|00002650| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 69 6e 44 |reak;...|case inD|
|00002660| 72 61 67 20 3a 0d 09 09 | 09 44 6f 44 72 61 67 28 |rag :...|.DoDrag(|
|00002670| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|00002680| 61 73 65 20 69 6e 47 72 | 6f 77 20 3a 0d 09 09 09 |ase inGr|ow :....|
|00002690| 69 66 20 28 66 43 75 72 | 44 6f 63 20 21 3d 20 6e |if (fCur|Doc != n|
|000026a0| 69 6c 29 0d 09 09 09 20 | 20 66 43 75 72 44 6f 63 |il).... | fCurDoc|
|000026b0| 2d 3e 44 6f 47 72 6f 77 | 28 26 74 45 76 74 29 3b |->DoGrow|(&tEvt);|
|000026c0| 09 09 09 09 09 0d 09 09 | 09 62 72 65 61 6b 3b 0d |........|.break;.|
|000026d0| 09 09 63 61 73 65 20 69 | 6e 5a 6f 6f 6d 49 6e 20 |..case i|nZoomIn |
|000026e0| 3a 0d 09 09 63 61 73 65 | 20 69 6e 5a 6f 6f 6d 4f |:...case| inZoomO|
|000026f0| 75 74 20 3a 0d 09 09 09 | 69 66 20 28 28 54 72 61 |ut :....|if ((Tra|
|00002700| 63 6b 42 6f 78 28 66 57 | 68 69 63 68 57 69 6e 64 |ckBox(fW|hichWind|
|00002710| 6f 77 2c 20 74 45 76 74 | 2e 77 68 65 72 65 2c 20 |ow, tEvt|.where, |
|00002720| 70 61 72 74 43 6f 64 65 | 29 29 20 26 26 0d 09 09 |partCode|)) &&...|
|00002730| 09 09 28 66 43 75 72 44 | 6f 63 20 21 3d 20 6e 69 |..(fCurD|oc != ni|
|00002740| 6c 29 29 0d 09 09 09 20 | 20 66 43 75 72 44 6f 63 |l)).... | fCurDoc|
|00002750| 2d 3e 44 6f 5a 6f 6f 6d | 28 70 61 72 74 43 6f 64 |->DoZoom|(partCod|
|00002760| 65 29 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |e);....b|reak;...|
|00002770| 63 61 73 65 20 69 6e 43 | 6f 6e 74 65 6e 74 20 3a |case inC|ontent :|
|00002780| 0d 09 09 09 2f 2f 20 49 | 66 20 77 69 6e 64 6f 77 |....// I|f window|
|00002790| 20 69 73 20 6e 6f 74 20 | 69 6e 20 66 72 6f 6e 74 | is not |in front|
|000027a0| 2c 20 6d 61 6b 65 20 69 | 74 20 73 6f 0d 09 09 09 |, make i|t so....|
|000027b0| 69 66 20 28 20 66 57 68 | 69 63 68 57 69 6e 64 6f |if ( fWh|ichWindo|
|000027c0| 77 20 21 3d 20 46 72 6f | 6e 74 57 69 6e 64 6f 77 |w != Fro|ntWindow|
|000027d0| 28 29 20 29 0d 09 09 09 | 20 20 53 65 6c 65 63 74 |() )....| Select|
|000027e0| 57 69 6e 64 6f 77 28 66 | 57 68 69 63 68 57 69 6e |Window(f|WhichWin|
|000027f0| 64 6f 77 29 3b 0d 09 09 | 09 65 6c 73 65 20 69 66 |dow);...|.else if|
|00002800| 20 28 66 43 75 72 44 6f | 63 20 21 3d 20 6e 69 6c | (fCurDo|c != nil|
|00002810| 29 0d 09 09 09 20 20 66 | 43 75 72 44 6f 63 2d 3e |).... f|CurDoc->|
|00002820| 44 6f 43 6f 6e 74 65 6e | 74 28 26 74 45 76 74 29 |DoConten|t(&tEvt)|
|00002830| 3b 09 09 09 09 09 0d 09 | 09 09 62 72 65 61 6b 3b |;.......|..break;|
|00002840| 0d 09 20 20 7d 0d 7d 0d | 0d 76 6f 69 64 20 54 41 |.. }.}.|.void TA|
|00002850| 70 70 6c 69 63 61 74 69 | 6f 6e 3a 3a 44 6f 44 72 |pplicati|on::DoDr|
|00002860| 61 67 28 76 6f 69 64 29 | 0d 7b 0d 09 44 72 61 67 |ag(void)|.{..Drag|
|00002870| 57 69 6e 64 6f 77 28 66 | 57 68 69 63 68 57 69 6e |Window(f|WhichWin|
|00002880| 64 6f 77 2c 20 66 54 68 | 65 45 76 65 6e 74 2e 77 |dow, fTh|eEvent.w|
|00002890| 68 65 72 65 2c 20 26 71 | 64 2e 73 63 72 65 65 6e |here, &q|d.screen|
|000028a0| 42 69 74 73 2e 62 6f 75 | 6e 64 73 29 3b 0d 7d 0d |Bits.bou|nds);.}.|
|000028b0| 0d 76 6f 69 64 20 54 41 | 70 70 6c 69 63 61 74 69 |.void TA|pplicati|
|000028c0| 6f 6e 3a 3a 44 6f 47 6f | 41 77 61 79 28 76 6f 69 |on::DoGo|Away(voi|
|000028d0| 64 29 0d 7b 0d 09 69 66 | 20 28 54 72 61 63 6b 47 |d).{..if| (TrackG|
|000028e0| 6f 41 77 61 79 28 66 57 | 68 69 63 68 57 69 6e 64 |oAway(fW|hichWind|
|000028f0| 6f 77 2c 20 66 54 68 65 | 45 76 65 6e 74 2e 77 68 |ow, fThe|Event.wh|
|00002900| 65 72 65 29 29 0d 09 20 | 20 7b 0d 09 09 69 66 20 |ere)).. | {...if |
|00002910| 28 66 43 75 72 44 6f 63 | 20 21 3d 20 6e 69 6c 29 |(fCurDoc| != nil)|
|00002920| 0d 09 09 20 20 7b 0d 09 | 09 09 66 44 6f 63 4c 69 |... {..|..fDocLi|
|00002930| 73 74 2d 3e 52 65 6d 6f | 76 65 44 6f 63 28 66 43 |st->Remo|veDoc(fC|
|00002940| 75 72 44 6f 63 29 3b 0d | 09 09 09 64 65 6c 65 74 |urDoc);.|...delet|
|00002950| 65 20 66 43 75 72 44 6f | 63 3b 0d 09 09 20 20 7d |e fCurDo|c;... }|
|00002960| 0d 09 09 65 6c 73 65 20 | 43 6c 6f 73 65 44 65 73 |...else |CloseDes|
|00002970| 6b 41 63 63 28 28 28 57 | 69 6e 64 6f 77 50 65 65 |kAcc(((W|indowPee|
|00002980| 6b 29 20 66 57 68 69 63 | 68 57 69 6e 64 6f 77 29 |k) fWhic|hWindow)|
|00002990| 2d 3e 77 69 6e 64 6f 77 | 4b 69 6e 64 29 3b 0d 09 |->window|Kind);..|
|000029a0| 20 20 7d 0d 7d 0d 0d 42 | 6f 6f 6c 65 61 6e 20 54 | }.}..B|oolean T|
|000029b0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 3a 3a 54 72 61 |Applicat|ion::Tra|
|000029c0| 70 41 76 61 69 6c 61 62 | 6c 65 28 73 68 6f 72 74 |pAvailab|le(short|
|000029d0| 20 74 4e 75 6d 62 65 72 | 2c 54 72 61 70 54 79 70 | tNumber|,TrapTyp|
|000029e0| 65 20 74 54 79 70 65 29 | 0d 7b 0d 09 2f 2f 20 43 |e tType)|.{..// C|
|000029f0| 68 65 63 6b 20 61 6e 64 | 20 73 65 65 20 69 66 20 |heck and| see if |
|00002a00| 74 68 65 20 74 72 61 70 | 20 65 78 69 73 74 73 2e |the trap| exists.|
|00002a10| 20 4f 6e 20 36 34 4b 20 | 52 4f 4d 20 6d 61 63 68 | On 64K |ROM mach|
|00002a20| 69 6e 65 73 2c 20 74 54 | 79 70 65 20 77 69 6c 6c |ines, tT|ype will|
|00002a30| 20 62 65 20 69 67 6e 6f | 72 65 64 2e 0d 09 72 65 | be igno|red...re|
|00002a40| 74 75 72 6e 20 4e 47 65 | 74 54 72 61 70 41 64 64 |turn NGe|tTrapAdd|
|00002a50| 72 65 73 73 28 74 4e 75 | 6d 62 65 72 2c 20 74 54 |ress(tNu|mber, tT|
|00002a60| 79 70 65 29 20 21 3d 20 | 47 65 74 54 72 61 70 41 |ype) != |GetTrapA|
|00002a70| 64 64 72 65 73 73 28 5f | 55 6e 69 6d 70 6c 65 6d |ddress(_|Unimplem|
|00002a80| 65 6e 74 65 64 29 3b 0d | 7d 20 2f 2a 54 72 61 70 |ented);.|} /*Trap|
|00002a90| 41 76 61 69 6c 61 62 6c | 65 2a 2f 0d 0d 76 6f 69 |Availabl|e*/..voi|
|00002aa0| 64 20 41 6c 65 72 74 55 | 73 65 72 28 73 68 6f 72 |d AlertU|ser(shor|
|00002ab0| 74 20 65 72 72 52 65 73 | 49 44 2c 20 73 68 6f 72 |t errRes|ID, shor|
|00002ac0| 74 20 65 72 72 43 6f 64 | 65 29 0d 7b 0d 09 53 74 |t errCod|e).{..St|
|00002ad0| 72 32 35 35 20 6d 65 73 | 73 61 67 65 3b 0d 0d 09 |r255 mes|sage;...|
|00002ae0| 53 65 74 43 75 72 73 6f | 72 28 26 71 64 2e 61 72 |SetCurso|r(&qd.ar|
|00002af0| 72 6f 77 29 3b 0d 09 47 | 65 74 49 6e 64 53 74 72 |row);..G|etIndStr|
|00002b00| 69 6e 67 28 6d 65 73 73 | 61 67 65 2c 20 65 72 72 |ing(mess|age, err|
|00002b10| 52 65 73 49 44 2c 20 65 | 72 72 43 6f 64 65 29 3b |ResID, e|rrCode);|
|00002b20| 0d 09 50 61 72 61 6d 54 | 65 78 74 28 6d 65 73 73 |..ParamT|ext(mess|
|00002b30| 61 67 65 2c 20 22 5c 70 | 22 2c 20 22 5c 70 22 2c |age, "\p|", "\p",|
|00002b40| 20 22 5c 70 22 29 3b 0d | 09 28 76 6f 69 64 29 20 | "\p");.|.(void) |
|00002b50| 41 6c 65 72 74 28 72 55 | 73 65 72 41 6c 65 72 74 |Alert(rU|serAlert|
|00002b60| 2c 20 28 4d 6f 64 61 6c | 46 69 6c 74 65 72 50 72 |, (Modal|FilterPr|
|00002b70| 6f 63 50 74 72 29 20 6e | 69 6c 29 3b 0d 7d 20 2f |ocPtr) n|il);.} /|
|00002b80| 2f 20 41 6c 65 72 74 55 | 73 65 72 0d 0d 76 6f 69 |/ AlertU|ser..voi|
|00002b90| 64 20 42 69 67 42 61 64 | 45 72 72 6f 72 28 73 68 |d BigBad|Error(sh|
|00002ba0| 6f 72 74 20 65 72 72 52 | 65 73 49 44 2c 20 73 68 |ort errR|esID, sh|
|00002bb0| 6f 72 74 20 65 72 72 43 | 6f 64 65 29 0d 7b 0d 09 |ort errC|ode).{..|
|00002bc0| 41 6c 65 72 74 55 73 65 | 72 28 65 72 72 52 65 73 |AlertUse|r(errRes|
|00002bd0| 49 44 2c 65 72 72 43 6f | 64 65 29 3b 0d 09 45 78 |ID,errCo|de);..Ex|
|00002be0| 69 74 54 6f 53 68 65 6c | 6c 28 29 3b 0d 7d 0d 0d |itToShel|l();.}..|
|00002bf0| 2f 2f 20 54 68 61 74 27 | 73 20 61 6c 6c 2c 20 66 |// That'|s all, f|
|00002c00| 6f 6c 6b 73 2e 2e 2e 0d | 00 00 00 00 00 00 00 00 |olks....|........|
|00002c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c80| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00002c90| 74 75 61 6c 20 76 6f 69 | 64 20 44 69 73 6b 45 76 |tual voi|d DiskEv|
|00002ca0| 74 28 29 20 7b 7d 0d 09 | 76 69 72 74 75 61 6c 20 |t() {}..|virtual |
|00002cb0| 0f 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 2e 63 70 |.TApplic|ation.cp|
|00002cc0| 02 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 a0 a1 88 d6 00 00 | 00 00 00 00 01 7e 7b 7d |........|.....~{}|
|00002d00| 0d 09 76 69 72 74 75 61 | 6c 20 76 6f 69 64 20 41 |..virtua|l void A|
|00002d10| 70 70 31 45 76 74 28 29 | 20 7b 7d 0d 09 76 69 72 |pp1Evt()| {}..vir|
|00002d20| 74 75 61 6c 20 76 6f 69 | 64 20 41 70 70 32 45 76 |tual voi|d App2Ev|
|00002d30| 74 28 29 20 7b 7d 0d 09 | 76 69 72 74 75 61 6c 20 |t() {}..|virtual |
|00002d40| 76 6f 69 64 20 41 70 70 | 33 45 76 74 28 29 20 7b |void App|3Evt() {|
|00002d50| 7d 0d 09 76 69 72 74 75 | 61 6c 20 76 6f 69 64 20 |}..virtu|al void |
|00002d60| 41 70 70 34 45 76 74 28 | 29 20 7b 7d 0d 09 76 69 |App4Evt(|) {}..vi|
|00002d70| 72 74 75 61 6c 20 76 6f | 69 64 20 4e 75 6c 6c 45 |rtual vo|id NullE|
|00002d80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002d90| 00 00 00 00 00 00 00 60 | 02 60 02 61 7f ff 01 28 |.......`|.`.a...(|
|00002da0| 00 06 02 60 7f ff 00 06 | 00 04 00 27 00 00 01 df |...`....|...'....|
|00002db0| 02 30 00 50 00 20 01 dd | 02 3d a0 72 16 43 00 00 |.0.P. ..|.=.r.C..|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00002dd0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 16 a5 64 |...L...L|...2...d|
|00002de0| 07 5a 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.Z.....2|..MPSR..|
|00002df0| 00 0a 03 ed ff ff 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+